<template>
	<div class="decorate-xcxlink"
		:style="{padding:tplItemData.modulePadding + 'px ' + tplItemData.levelPadding + 'px'}" >
		<div class="xcxlink-box" >
			<div v-for="(item,index) in tplItemData.dataset" :key="index" class="xcxItem" @click="handleLinkTo('liveList')" >
				<!-- 分享组件 -->
				<wx-button open-type="share" class="ljbm" v-if="type == 54">
					<img :src="item.pic?item.pic:'https://img.wifenxiao.com/h5-wfx/images/noImg.png'" alt="" />
				</wx-button>
        <!-- 直播列表组件 -->
				<a href="javascript:;" v-else>
					<img :src="item.pic?item.pic:'https://img.wifenxiao.com/h5-wfx/images/noImg.png'" alt="" />
				</a>

			</div>
		</div>
	</div>
</template>

<script>
import Vue from 'vue'
import small from '@/smallapp/small'

export default Vue.extend({
	name: 'index',
	props: {
		tplItemData: {
			type: Object // 传入参数的类型
		},
		type: {
			type: [String, Number] // 传入参数的类型
		}
	},
	data() {
		return {
			
		}
	},
	methods: {
		Jump(url, data) {
      // const data = { type }
      this.$JumpPath(this, url, data)
    },
    handleLinkTo(url, data) {
			if (this.type == 44) {
      	this.$JumpName(this, url, data)
			} else if (this.type == 55) {
      	wx.scanCode({
          success: (res) => {
            // console.log(res)
            openPage(res.result)
          }
        })
			}
    },
    JumpUrl(url, data) {
      window.location.href = url
    },
	},
})
</script>

<style lang='scss'>
</style>
